library(tidyverse)

files = str_c("../",c(18,20,22,46,48,50,52,54))

p_list = list()
i = 1
for(fileName in files){
  fileName = str_c(fileName,"/result.txt")
  data = read.table(fileName,header = F)
  p_list[[i]] = data %>% 
    slice_max(V2,n = 100,with_ties = F ) %>% 
    mutate(id = 1:100) %>%
    ggplot(aes(x = id,y = V2)) + 
    geom_bar(stat = "identity") +
    theme(axis.text.x = element_text(angle = 90))
  i = i +1 
}

p_list[[1]]
p_list[[2]]
p_list[[3]]
p_list[[4]]
p_list[[5]]
p_list[[6]]
p_list[[7]]
p_list[[8]]

